package org.pearl.oauth2.authorizationserverdemo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 客户端信息
 * </p>
 *
 * @author td
 * @since 2021-07-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("oauth_client_details")
@ApiModel(value="OauthClientDetails对象", description="客户端信息")
public class OauthClientDetails implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键 （客户端名）")
    @TableId(value = "client_id", type = IdType.ID_WORKER)
    private String clientId;

    @ApiModelProperty(value = "访问密匙")
    private String clientSecret;

    @ApiModelProperty(value = "授权类型")
    private String authorizedGrantTypes;

    @ApiModelProperty(value = "重定向URI")
    private String webServerRedirectUri;

    @ApiModelProperty(value = "访问token有效期(单位:秒)")
    private Integer accessTokenValidity;

    @ApiModelProperty(value = "刷新token有效期(单位:秒)")
    private Integer refreshTokenValidity;

    @ApiModelProperty(value = "权限范围（read,write,trust）")
    private String scope;

    @ApiModelProperty(value = "资源id集合")
    private String resourceIds;

    @ApiModelProperty(value = "Spring Security的权限值")
    private String authorities;

    @ApiModelProperty(value = "授权类型")
    private String additionalInformation;

    @ApiModelProperty(value = "（预留字段）")
    private String autoapprove;


}
